/*
    rexgen - a tool to create words based on regular expressions
    Copyright (C) 2012-2013  Jan Starke <jan.starke@outofbed.org>

    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the Free
    Software Foundation; either version 2 of the License, or (at your option)
    any later version.

    This program is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
    more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin St, Fifth Floor, Boston, MA 02110, USA
*/


#ifndef QUANTIFIER_H
#define QUANTIFIER_H

class Quantifier {

 public:
  Quantifier() : min(1), max(1) {}
  Quantifier(unsigned int _min, unsigned int _max) : min(_min), max(_max) {}
  Quantifier ( const Quantifier& other ): min(other.min), max(other.max) {}
  virtual ~Quantifier() {}
  virtual Quantifier& operator= ( const Quantifier& other ) {
    this->min = other.getMin();
    this->max = other.getMax();
    return *this;
  }
  virtual bool operator== ( const Quantifier& other ) const {
    return (this->min == other.min) && (this->max == other.max);
  }

  inline unsigned int getMin() const { return min; }
  inline unsigned int getMax() const { return max; }

  inline void setMin(unsigned _min) { min = _min; }
  inline void setMax(unsigned _max) { max = _max; }

 public:
  unsigned int min;
  unsigned int max;
};

#endif // QUANTIFIER_H
